package com.zhehekeji.opsys.api.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

// Generated 2015-8-10 16:02:09 by Hibernate Tools 3.4.0.CR1

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * TCmsCategory generated by hbm2java
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name="t_cms_category")
public class TCmsCategory implements java.io.Serializable {

	/** 
	* @Fields serialVersionUID : TODO
	*/ 
	private static final long serialVersionUID = -2225361260299066700L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "ID", length = 20, nullable = false, unique = true)
	private Long id;

	@Column(name = "ORIGINAL_CODE", length = 64, nullable = true)
	private String originalCode;

	@Column(name = "CODE", length = 64, nullable = true)
	private String code;

	@Column(name = "NAME", length = 128, nullable = true)
	private String name;

	@Column(name = "PARENT_CODE", length = 64, nullable = true)
	private String parentCode;

	@Column(name = "POSTER", length = 512, nullable = true)
	private String poster;

	@Column(name = "THUMBNAL", length = 512, nullable = true)
	private String thumbnal;

	@Column(name = "PROVINCE", length = 6, nullable = true)
	private String province;

	@Column(name = "DESCRIPTION", nullable = true)
	private String description;

	@Column(name = "SEQUENCE", length = 11, nullable = true)
	private Integer sequence;

	@Column(name = "ORDER_NO", length = 128, nullable = true)
	private String orderNo;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "ONLINE_TIME", nullable = true)
	private Date onlineTime;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "OFFLINE_TIME", nullable = true)
	private Date offlineTime;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "UPDATE_TIME", nullable = true)
	private Date updateTime;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", nullable = true)
	private Date createTime;

	@Column(name = "STATUS", length = 2, nullable = true)
	private Integer status;

	@Column(name = "CP_CODE", length = 20, nullable = true)
	private Long cpCode;

	@Column(name = "CMD_ID")
	private Long cmdID;

	@Column(name = "FOCUS_PICTURE")
	private String focusPicture;

	@Column(name = "UNFOCUS_PICTURE")
	private String unfocusPicture;
	
	@Column(name = "TAGS", length = 256, nullable = true)
    private String tags;
	
	@Column(name = "TYPE", length = 11, nullable = true)
	private Integer type;

	/**
	 * 动态数据，加载发布表里面的状态
	 */
	@Transient
	private String publishStatus;

	/**
	 * 显示标识：0-名称；1-图片
	 */
	@Column(name = "DISPLAY_FLAG", length = 2, nullable = true)
	private Integer displayFlag;

	public TCmsCategory(String originalCode, String code, String name,
						String parentCode, String poster, String thumbnal,
						String description, Integer sequence, Date updateTime,
						Date createTime, Integer status, Long cpCode) {
		this.originalCode = originalCode;
		this.code = code;
		this.name = name;
		this.parentCode = parentCode;
		this.poster = poster;
		this.thumbnal = thumbnal;
		this.description = description;
		this.sequence = sequence;
		this.updateTime = updateTime;
		this.createTime = createTime;
		this.status = status;
		this.cpCode = cpCode;
	}

}
